package com.gg.ggw.model;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2016/12/8.
 */
@Entity
@Table(name = "gg_user", schema = "guoguan", catalog = "")
public class GgUser {
    private int id;
    private byte userstatus;
    private int cent;
    private String username;
    private String password;
    private String wxid;
    private String openid;
    private String nickname;
    private String headimgurl;
    private String sex;
    private String province;
    private String city;
    private String country;
    private String remark;
    private Timestamp addtime;
    private Timestamp lastlogtime;
    private int logincount;
    private String from;
    private byte status;
    private String realname;
    private String phone;
    private Timestamp lastreflush;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "userstatus")
    public byte getUserstatus() {
        return userstatus;
    }

    public void setUserstatus(byte userstatus) {
        this.userstatus = userstatus;
    }

    @Basic
    @Column(name = "cent")
    public int getCent() {
        return cent;
    }

    public void setCent(int cent) {
        this.cent = cent;
    }

    @Basic
    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "wxid")
    public String getWxid() {
        return wxid;
    }

    public void setWxid(String wxid) {
        this.wxid = wxid;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    @Basic
    @Column(name = "nickname")
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    @Basic
    @Column(name = "headimgurl")
    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "country")
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "addtime")
    public Timestamp getAddtime() {
        return addtime;
    }

    public void setAddtime(Timestamp addtime) {
        this.addtime = addtime;
    }

    @Basic
    @Column(name = "lastlogtime")
    public Timestamp getLastlogtime() {
        return lastlogtime;
    }

    public void setLastlogtime(Timestamp lastlogtime) {
        this.lastlogtime = lastlogtime;
    }

    @Basic
    @Column(name = "logincount")
    public int getLogincount() {
        return logincount;
    }

    public void setLogincount(int logincount) {
        this.logincount = logincount;
    }

    @Basic
    @Column(name = "from")
    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    @Basic
    @Column(name = "status")
    public byte getStatus() {
        return status;
    }

    public void setStatus(byte status) {
        this.status = status;
    }

    @Basic
    @Column(name = "realname")
    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "lastreflush")
    public Timestamp getLastreflush() {
        return lastreflush;
    }

    public void setLastreflush(Timestamp lastreflush) {
        this.lastreflush = lastreflush;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GgUser user = (GgUser) o;

        if (id != user.id) return false;
        if (userstatus != user.userstatus) return false;
        if (cent != user.cent) return false;
        if (logincount != user.logincount) return false;
        if (status != user.status) return false;
        if (username != null ? !username.equals(user.username) : user.username != null) return false;
        if (password != null ? !password.equals(user.password) : user.password != null) return false;
        if (wxid != null ? !wxid.equals(user.wxid) : user.wxid != null) return false;
        if (openid != null ? !openid.equals(user.openid) : user.openid != null) return false;
        if (nickname != null ? !nickname.equals(user.nickname) : user.nickname != null) return false;
        if (headimgurl != null ? !headimgurl.equals(user.headimgurl) : user.headimgurl != null) return false;
        if (sex != null ? !sex.equals(user.sex) : user.sex != null) return false;
        if (province != null ? !province.equals(user.province) : user.province != null) return false;
        if (city != null ? !city.equals(user.city) : user.city != null) return false;
        if (country != null ? !country.equals(user.country) : user.country != null) return false;
        if (remark != null ? !remark.equals(user.remark) : user.remark != null) return false;
        if (addtime != null ? !addtime.equals(user.addtime) : user.addtime != null) return false;
        if (lastlogtime != null ? !lastlogtime.equals(user.lastlogtime) : user.lastlogtime != null) return false;
        if (from != null ? !from.equals(user.from) : user.from != null) return false;
        if (realname != null ? !realname.equals(user.realname) : user.realname != null) return false;
        if (phone != null ? !phone.equals(user.phone) : user.phone != null) return false;
        if (lastreflush != null ? !lastreflush.equals(user.lastreflush) : user.lastreflush != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (int) userstatus;
        result = 31 * result + cent;
        result = 31 * result + (username != null ? username.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (wxid != null ? wxid.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (nickname != null ? nickname.hashCode() : 0);
        result = 31 * result + (headimgurl != null ? headimgurl.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (province != null ? province.hashCode() : 0);
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (country != null ? country.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (addtime != null ? addtime.hashCode() : 0);
        result = 31 * result + (lastlogtime != null ? lastlogtime.hashCode() : 0);
        result = 31 * result + logincount;
        result = 31 * result + (from != null ? from.hashCode() : 0);
        result = 31 * result + (int) status;
        result = 31 * result + (realname != null ? realname.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (lastreflush != null ? lastreflush.hashCode() : 0);
        return result;
    }
}
